/*
 *http://www.apache.org/licenses/LICENSE-2.0
 *Copyright (c) 2021 fullset
 *@ClassName BeanUtil
 *@date 2021/6/27 15:05
 *@author: pangps
 *@Description TODO
 */
package com.fs.core.util;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class BeanUtil {

    private static final Logger logger = LoggerFactory.getLogger(BeanUtil.class);

    /**
     * 复制对象的属性方法
     * @param source 源对象
     * @param target 目标对象
     */
    public static void copyAttribute(Object source, Object target) {
        if(source == null) {
            logger.warn("Null source object detected");
        } else {
            org.springframework.beans.BeanUtils.copyProperties(source, target);
        }
    }
}
